﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for Publisher
/// </summary>
public class Publisher
{
    public int Id { get; set; }
    public string PublisherName { get; set; }

	public Publisher()
	{
		//
		// TODO: Add constructor logic here
		//
	}

    public static List<Publisher> GetAllPublishers()
    {
        DBHelper dbhelper = new DBHelper();
        return dbhelper.GetAllPublishers();
    }

    public static Publisher GetPublisherById(int PId)
    {
        Publisher objPub = GetAllPublishers().Find(x => x.Id == PId);
        return objPub;
    }
    
}